package com.csun.dsms.mapper;

import com.csun.dsms.model.domain.DsmsUser;
import com.csun.dsms.model.dto.user.UserQueryDto;
import com.csun.dsms.model.vo.user.UserVo;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

public interface DsmsUserMapper extends Mapper<DsmsUser> {

    /**
     * select by login name
     *
     * @param loginName  the login name
     *
     * @return  the dsms user.
     */
    DsmsUser selectByLoginName(String loginName);

    /**
     * select user info by user id
     *
     * @param userId    the user id
     *
     * @return  the dsms user info.
     */
    DsmsUser selectUserById(Long userId);

    /**
     * 查询用户列表.
     *
     * @param userQueryDto  the iser query dto
     *
     * @return  the user vo list.
     */
    List<UserVo> queryListWithPage(UserQueryDto userQueryDto);

    /**
     * 根据登录名获取用户信息
     *
     * @param loginName the login name
     *
     * @return  the dsms user.
     */
    DsmsUser findByLoginName(String loginName);
}